body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
}

.rounded-button {
  border-radius: 6px;
}

.react-flow__edge-path {
  transition: all 0.3s ease;
}

.react-flow__edge.selected .react-flow__edge-path {
  stroke: #3b82f6 !important;  /* 选中时使用蓝色 */
  stroke-width: 4 !important;
}

.react-flow__edge:hover .react-flow__edge-path {
  stroke: #64748b !important;  /* 悬停时颜色加深 */
  stroke-width: 4 !important;
}

.react-flow__edge-textbg {
  fill: #f8fafc !important;    /* 文本背景增强可视性 */
}

.react-flow__edge-text {
  fill: #1e293b !important;    /* 文本颜色加深 */
}

/* 右键菜单动画 */
.context-menu {
  animation: menuSlideIn 0.2s ease-out;
  transform-origin: top left;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 智能体卡片hover效果 */
.node {
  transition: transform 0.2s, box-shadow 0.2s;
}

.node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
